<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
    <form @submit="loginSubmit">
      <view>
        <input class="login-input login-margin-wrap" name="username" placeholder="请输入登录用户名" />
        <input class="login-input login-margin-wrap" name="password" password type="text"  placeholder="请输入登录密码" />
      </view>
      <view class="login-margin-wrap">
        <button class="login-btn" form-type="submit">登录</button>
      </view>
    </form>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
      loginSubmit(e) {
        uni.switchTab({
          url: '../home/index'
        })
        console.log('form发生了submit事件，携带数据为：' + JSON.stringify(e.detail.value))
      }
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
    padding: 0 30rpx;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
  
.login-input {
  border-bottom: 1px groove orange;
  height: 100%;
}
.login-btn {
  background-color: orange;
  font-size: 16px;
}
.login-margin-wrap {
  margin: 50rpx;
}
</style>
